<div class="container-fluid">
	<div id="pad-wrapper">
		<!-- products table-->
		<!-- the script for the toggle all checkboxes from header is located in js/theme.js -->
		<div class="table-wrapper products-table section">
			<div class="row-fluid head">
				<div class="span12">
					<h4>无创预约单列表</h4>
				</div>
			</div>
			
			<form action="" method="get" name="search">
			<div class="row-fluid filter-block">
				<div class="pull-left">
				<a class="btn-flat success" onclick="batch_upload();">批量上传预约单</a>
				</div>
				<div class="pull-right">
					
				</div>
			</div>
			</form>
			
			<div class="row-fluid">
				<table class="table table-hover">
					<thead>
						<tr>
							<th class="span3">预约单号</th>
							<th class="span3"><span class="line"></span>预约下单时间</th>
							<th class="span3"><span class="line"></span>预约状态</th>
							<th class="span3"><span class="line"></span>受检人</th>
							<th class="span3"><span class="line"></span>推荐医院</th>
							<th class="span3"><span class="line"></span>推荐医生</th>
							<th class="span3"><span class="line"></span>采血点</th>
							<th class="span3"><span class="line"></span>操作</th>
						</tr>
					</thead>
					<tbody>
						<?php if($list):?>
						<?php foreach ($list as $item):?>
						<!-- row -->
						<tr class="first">
							<td><?php echo $item['order_no']?></td>
							<td><?php echo date('Y-m-d H:i:s', $item['create_time'])?></td>
							<td><?php echo $arr_status[$item['status']]?></td>
							<td><?php echo $item['real_name']?></td>
							<td><?php echo $item['hospital_name']?></td>
							<td><?php echo $item['doctor_name']?></td>
							<td><?php echo $item['bpoint_name']?></td>
							<td>
								<button type="button" class=" btn-flat primary" onclick="window.location.href='/booking/edit?id=<?php echo $item['id']?>'">详细</button>
								<button type="button" class=" btn-flat primary" onclick="upload_report(<?php echo $item['id']?>)">上传报告</button>
							</td>
						</tr>
						<?php endforeach;?>
						<?php endif;?>
					</tbody>
				</table>
			</div>
		</div>
		<!-- end products table -->
	</div>
	<div class="pagination pull-right">
	  <?php echo $pagination;?>
	</div>
</div>
<script>
function upload_report(id)
{
	var url = "/booking/report?id="+id;
	window.open(url, 'newwindow', 'height=200, width=300, top='+(screen.availHeight-100)/2+', left='+(screen.availWidth-400)/2+', toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no');
}

function batch_upload()
{
	{
		var url = "/booking/batch";
		window.open(url, 'newwindow', 'height=200, width=300, top='+(screen.availHeight-100)/2+', left='+(screen.availWidth-400)/2+', toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no');
	}
}
</script>

